import Vue from 'vue'
//import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
import App from './App.vue'
import VueRouter from "vue-router"
import FrozenUI from 'frozenui'
import store from './vuex/store'
import MintUI from 'mint-ui'
import Icon from 'element-ui'


//开启debug模式
Vue.config.debug = true;
Vue.use(VueRouter);
Vue.use(MintUI);
Vue.use(Icon);


//Vue.use(MintUI);
import  index from './components/index.vue'
import  music from './components/music.vue'
import  user from './components/user.vue'
import  singer from './components/singer.vue'
import  pai from './components/pai.vue'
import  fensi from './components/fensi.vue'
import  pl from './components/pl.vue'
import  praise from './components/praise.vue'
import  ti from './components/ti.vue'
import  music1 from './components/music1.vue'
import  music2 from './components/music2.vue'
import  music3 from './components/music3.vue'
import  music4 from './components/music4.vue'

// 创建一个路由器实例并且配置路由规则
const router = new VueRouter({
  mode: 'hash',
  base: __dirname,
  routes: [

      {
          path:'/',
          component:index
      },
      {
          path:'/index',
          component:index
      },
      {
          path:'/music',
          component:music
      },
      {
          path:'/singer',
          component:singer
      },
      {
          path:'/user',
          component:user
      },
      {
          path:'/pai',
          component:pai
      },
      {
          path:'/fensi',
          component:fensi
      },
      {
          path:'/pl',
          component:pl
      },
      {
          path:'/music1',
          component:music1
      },
      {
          path:'/music2',
          component:music2
      },
      {
          path:'/music3',
          component:music3
      },
      {
          path:'/music4',
          component:music4
      },
      {
          path:'/praise',
          component:praise
      },
      {
          path:'/ti',
          component:ti
      }
  ]
})
router.afterEach(function(to){
    window.scrollTo(0,0)
});
// 路由器会创建一个 App 实例，并且挂载到选择符 #app 匹配的元素上。
const app = new Vue({
      router: router,
      store,
      render: h => h(App)
}).$mount('#app')

